//
//  DetailModel.swift
//  CJXSwiftStoryboard
//
//  Created by CJX on 2016/10/27.
//  Copyright © 2016年 caijianxi. All rights reserved.
//

import UIKit

class DetailModel: NSObject {

    var products_name : String?
    
    var qty : String?
    
    var value : String?
    
    var price : String?
    
    
    
    init(dictionary:NSDictionary) {
        
        products_name = dictionary["products_name"]as?String
        qty = String(dictionary["qty"]!)
        price = dictionary["price"]as?String
        
        let arr = dictionary["attributes"]as?[[String:NSObject]]
        let dic =  (arr as? NSArray)?.firstObject as? NSDictionary
        
        value = String(dic!["value"]!)
    }
}
